\b0 method to receive color. If I drag a color to that view, my
\b acceptColor:atPoint
\b0 method will
\i not
\i0 be called, but if I drag the color to strategic locations
\i above
\i0 my view, my
\b acceptColor:atPoint:
\b0 method
\i will
\i0 be called. Why?\
\
A: This is a known bug in the AppKit. This bug has been reported and it will be fixed in our next major software release. For the time being, you can use the following bug workaround provided courtesy of Eric Ly and Glenn Reid from RightBrain Software. This fix will work for flipped views as well as non-flipped views.\
\
You'll need to add the following 3 files to your IB.proj, an
\b ENXCP.psw
\b0 file, and
\b ENXColorPanel.h
\b0 and
\b ENXColorPanel.m
\b0 files, that constitute a subclass of
NXColorPanel. You also have to change your
\b _main
\b0 file to use
\b poseAs:
\b0 which forces the AppKit to use the new subclass
ENXColorPanel instead of
NXColorPanel
\i .\
\i0 \
Note that you don't need to call
\b convertPoint:fromView:
\b0 in your own
\b acceptColor:atPoint:
\b0 method, since it's already done in the workaround code.\
\
Here's a possible implementation of
\b acceptColor:atPoint:
\b0 \
\pard\tx1140\tx2300\tx3440\tx4600\tx5760\tx6900\tx8060\tx9200\tx10360\tx11520\f2\fs24\fc0 - acceptColor:(NXColor) c atPoint:(NXPoint *)p\
\{\
someColor = c; /*someColor is an instance variable */\